import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: '资产编码',
    dataIndex: 'assetCoding'
   },
   {
    title: '资产名称',
    dataIndex: 'assetName'
   },
   {
    title: '规格型号',
    dataIndex: 'spec'
   },
   {
    title: '类别',
    dataIndex: 'category'
   },
   {
    title: '所属公司',
    dataIndex: 'company'
   },
   {
    title: '所属部门',
    dataIndex: 'dept'
   },
   {
    title: '所属人',
    dataIndex: 'owner'
   },
   {
    title: '使用人',
    dataIndex: 'userer'
   },
   {
    title: '使用年限',
    dataIndex: 'useTime'
   },
   {
    title: '原值',
    dataIndex: 'original'
   },
   {
    title: '净值',
    dataIndex: 'netWorth'
   },
   {
    title: '设备状态',
    dataIndex: 'status'
   },
   {
    title: 'url',
    dataIndex: 'url'
   },
   {
    title: '所属部门名称',
    dataIndex: 'deptName'
   },
   {
    title: '简单部门名称',
    dataIndex: 'simpleDeptName'
   },
   {
    title: '盘点方式，1扫码，2直盘',
    dataIndex: 'inventoryType'
   },
   {
    title: '计划使用年',
    dataIndex: 'planUserYear'
   },
   {
    title: '计划使用月',
    dataIndex: 'planUserMonth'
   },
   {
    title: '资产地址',
    dataIndex: 'assetsLocation'
   },
   {
    title: '租户id',
    dataIndex: 'tenantId'
   },
   {
    title: '类别名称',
    dataIndex: 'categoryName'
   },
   {
    title: '设备总数',
    dataIndex: 'totalNum'
   },
   {
    title: '仓库数量',
    dataIndex: 'storeNum'
   },
   {
    title: '仓库可用数量',
    dataIndex: 'storeUseNum'
   },
   {
    title: '备注',
    dataIndex: 'remark'
   },
   {
    title: '预警数量',
    dataIndex: 'warnNum'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: '资产编码',
    field: 'assetCoding',
    component: 'Input'
  },
 {
    label: '资产名称',
    field: 'assetName',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: '资产编码',
    field: 'assetCoding',
    component: 'Input',
  },
  {
    label: '资产名称',
    field: 'assetName',
    component: 'Input',
  },
  {
    label: '规格型号',
    field: 'spec',
    component: 'Input',
  },
  {
    label: '类别',
    field: 'category',
    component: 'Input',
  },
  {
    label: '所属公司',
    field: 'company',
    component: 'Input',
  },
  {
    label: '所属部门',
    field: 'dept',
    component: 'Input',
  },
  {
    label: '所属人',
    field: 'owner',
    component: 'Input',
  },
  {
    label: '使用人',
    field: 'userer',
    component: 'Input',
  },
  {
    label: '使用年限',
    field: 'useTime',
    component: 'Input',
  },
  {
    label: '原值',
    field: 'original',
    component: 'Input',
  },
  {
    label: '净值',
    field: 'netWorth',
    component: 'Input',
  },
  {
    label: '设备状态',
    field: 'status',
    component: 'Input',
  },
  {
    label: 'url',
    field: 'url',
    component: 'Input',
  },
  {
    label: '所属部门名称',
    field: 'deptName',
    component: 'Input',
  },
  {
    label: '简单部门名称',
    field: 'simpleDeptName',
    component: 'Input',
  },
  {
    label: '盘点方式，1扫码，2直盘',
    field: 'inventoryType',
    component: 'InputNumber',
  },
  {
    label: '计划使用年',
    field: 'planUserYear',
    component: 'Input',
  },
  {
    label: '计划使用月',
    field: 'planUserMonth',
    component: 'Input',
  },
  {
    label: '资产地址',
    field: 'assetsLocation',
    component: 'Input',
  },
  {
    label: '租户id',
    field: 'tenantId',
    component: 'InputNumber',
  },
  {
    label: '类别名称',
    field: 'categoryName',
    component: 'Input',
  },
  {
    label: '设备总数',
    field: 'totalNum',
    component: 'InputNumber',
  },
  {
    label: '仓库数量',
    field: 'storeNum',
    component: 'InputNumber',
  },
  {
    label: '仓库可用数量',
    field: 'storeUseNum',
    component: 'InputNumber',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
  {
    label: '预警数量',
    field: 'warnNum',
    component: 'InputNumber',
  },
];
